Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use triq instead of proper #80

Closed
wants to merge 1 commit into from
Closed

Use triq instead of proper #80

wants to merge 1 commit into from

Conversation

kxepal
Copy link

@kxepal kxepal commented Jan 21, 2015

This solves license issues caused by proper while tests still does their job right.
Note that amount of tests is dropped from 1000 to 10. This is because triq generates much more heavy and comprehensive cases than proper on each cycle. As the result, it requires much more memory to run the same amount of tests as proper has. I wasn't able to handle 100 tests with 8GB RAM without falling into swap. Starting from 30 you'll need ~4GB and you may not fit in 300 seconds limit. As for 10 the peak memory usage is somewhere around 200MB.

@davisp
Copy link
Owner

davisp commented Jan 21, 2015

I'll have to read more, but first, the whole rebar.config.script you got rid of wasn't for licensing issues. It was so that downstream users don't have to depend on PropEr. You'll most definitely have to undo that removal if triq is running in the many gigabyte range for tests.

And as I said, I'll have to read more, but many gigabytes for a few tests seems odd to say the least. If we're going to change things what I'd rather switch to is just a simpler fuzzing library that we can use to generate random JSON.

@davisp
Copy link
Owner

davisp commented Jan 21, 2015

Ah, its just a reimplementation. In that case I bet triq is just doing something different for the JSON generator:

https://github.com/davisp/jiffy/blob/master/test/jiffy_11_proper_tests.erl#L94-L129

I never fully groked how that recursive data generation is supposed to work so I just tweaked parameters long enough to generate "interesting" tests withouth blowing things up. I'm guessing its probably just a bug in the JSON generator definition.

@eproxus
Copy link

eproxus commented Sep 28, 2015

Just running 10 tests would mostly defeat the whole purpose of using Proper/Triq in the first place.

@kxepal
Copy link
Author

kxepal commented Sep 28, 2015

@eproxus more tests will cause OOM even for 8GB host. Triq doesn't support max_size options (or I didn't found the way to apply it), so that could explain why.

@eproxus
Copy link

eproxus commented Sep 28, 2015

That sounds extremely excessive. Some careful usage of the ?SIZE macro should help.

Just curious, what are the licensing issues with Proper?

@kxepal
Copy link
Author

kxepal commented Sep 28, 2015

@eproxus had no luck with, but may be I should try another shot.

Problem with licensing is that you cannot include GPL stuff into release tarball in order to run tests on end host while your product is not GPL.

@eproxus
Copy link

eproxus commented Sep 28, 2015

@kxepal Yeah, found the Proper issue: proper-testing/proper#29

@davisp
Copy link
Owner

davisp commented Dec 29, 2016

Closing this one out as I've swapped PropEr for EQC and just detect when its present or not.

@davisp davisp closed this Dec 29, 2016
@kxepal
Copy link
Author

kxepal commented Dec 29, 2016

Good choice as well, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants